package com.neusoft.work.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.work.po.CareProject;
import com.neusoft.work.po.PageResponseBean;
import com.neusoft.work.po.ResponseBean;
import com.neusoft.work.service.CareProjectService;


@RequestMapping("/CareProjectController")
@RestController
public class CareProjectController {
	@Autowired
	private CareProjectService cps;
	
	@RequestMapping("/queryByStatus")
	public PageResponseBean<List<CareProject>> queryByStatus(Integer status,Long cur,Long number,String name){
		return cps.queryByStatus(status, cur, number,name);
	}
	
	@RequestMapping("/addCareProject")
	public ResponseBean<Integer> addCareProject(CareProject careProject){
		return cps.addCareProject(careProject);
	}
	
	@RequestMapping("/updateCareProject")
	public ResponseBean<Integer> updateCareProject(CareProject careProject){
		return cps.updateCareProject(careProject);
	}
	
	@RequestMapping("/deleteCareProject")
	public ResponseBean<Integer> deleteCareProject(Integer id){
		return cps.deleteCareProject(id);
	}
}
